package com.wkbb.common.enums;

public enum ImBannedTypeEnum {
    /**
     * 正常
     */
    NORMAL((short)0,"正常"),
    /**
     * 一小时
     */
    ONEHOUR((short)1,"一小时"),
    /**
     * 一天
     */
    ONEDAY((short)2,"一天"),
    /**
     * 永久
     */
    PERPETUAL((short)2,"永久");

    private ImBannedTypeEnum(short value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Short value;

    private String desc;

    public Short getValue() {
        return this.value;
    }

    public void setValue(Short value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (ImBannedTypeEnum imBannedTypeEnum : ImBannedTypeEnum.values()) {
            if (imBannedTypeEnum.getValue().intValue() == value.intValue()) {
                return imBannedTypeEnum.getDesc();
            }
        }
        return null;
    }
}
